using System.Collections;
using System.Collections.Generic;
using GameBaseFramework.FrameWorkCommand;
using GameBaseFramework.Network;
using GameBaseFramework.Pattern;
using GameBaseFramework.Timer;
using GameGraphics;
using GameUnityFramework.UIView;
using UnityEngine;

/// <summary>
/// 游戏管理器
/// </summary>
public class GameManager : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        DontDestroyOnLoad(this);
        TestCode();
    }

    // Update is called once per frame
    void Update()
    {
        TimerManager.Update(Time.deltaTime);
        CommandManager.Update();
        NetworkManager.Instance.Update();
    }

    /// <summary>
    /// 测试代码，仅测试用
    /// </summary>
    private void TestCode()
    {
        UIViewManager.Instance.Open<UIViewBottomMax>(null, null, EViewOpenType.Overlying, EViewPriority.Level3, null);
        //UIViewManager.Instance.Open<UIViewChattingRoom>(null, null, EViewOpenType.Overlying, EViewPriority.Level1, null);
    }
}
